﻿<html class="x-admin-sm">

<head>
    <title>
        系统登录首页
    </title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="~/X-admin/css/font.css" rel="stylesheet" />
    <link href="~/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/X-admin/lib/layui/layui.js"></script>
    <link rel="shortcut icon" href="~/X-admin/images/logo4.png" />
    <script src="~/X-admin/js/xadmin.js"></script>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/js/sysweb/indexjs.js"></script>
</head>
<body class="index">
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo">
            <a onclick="location.href='Index'">旭日包装生产Mes(昀印)系统</a>
        </div>
        <div class="left_open">
            <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
        </div>
        <ul class="layui-nav right" lay-filter="">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <label id="userName"></label>
                </a>
                <dl class="layui-nav-child">
                    <dd>
                        <a onclick="ChangePwd()">修改密码</a>

                    </dd>
                    <dd>

                        <a onclick="logOut()">退出</a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item to-index">
                <a onclick="location.href='Index'">首页</a>
            </li>
        </ul>
    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
    <!-- 左侧菜单开始 -->
    <div class="left-nav" style="height:650px;overflow-y:auto">
        <div id="side-nav">
            <ul id="nav">
                <div id="navUrl">
                </div>


            </ul>
        </div>
    </div>
    <!-- <div class="x-slide_left"></div> -->
    <!-- 左侧菜单结束 -->
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li class="home">
                    <i class="layui-icon">&#xe68e;</i>我的桌面
                </li>
            </ul>
            <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
                <dl>
                    <dd data-type="this">关闭当前</dd>
                    <dd data-type="other">关闭其它</dd>
                    <dd data-type="all">关闭全部</dd>
                </dl>
            </div>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src='../Summary/DataShow' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
                </div>
            </div>
            <div id="tab_show"></div>
        </div>
    </div>
    <div class="page-content-bg"></div>
    <style id="theme_style"></style>
    <!-- 右侧主体结束 -->
    <!-- 中部结束 -->

</body>
</html>
<script type="text/javascript">
    $(function () {
        userInfo();
        loadNavigation();
    })
    function logOut() {
        location.href = "login";
    }

    // 启动期初打印打印客户端
    function OpenInitPrint() {
        var printUrl = "printBarTools://";
        const full = location.protocol + '//' + location.host;

        $.ajax({
            url: "../Base/GetLoginUser",
            // data: { dataId: data.id, byCode: data.byBarCode },
            dataType: "json",
            type: "POST",
            async: false,
            success: function (rsl) {
                if (rsl.result) {
                    var userStr = rsl.data;
                    var user = JSON.parse(userStr);

                    var query = {
                        type: "initPrint",
                        // plCode: data.plCode,
                        serverUrl: full,
                        logLevel: 'none', // info,warn,error
                        userCode: user.userCode,
                        baseCode: user.baseCode,
                    };
                    window.location.href = printUrl + JSON.stringify(query);

                } else {
                    layer.msg(info.message);
                }
            }
        });


    }

    // 启动原辅料重新打码客户端
    function OpenMatAuxRePrint() {

        var printUrl = "printBarTools://";
        const full = location.protocol + '//' + location.host;

        $.ajax({
            url: "../Base/GetLoginUser",
            // data: { dataId: data.id, byCode: data.byBarCode },
            dataType: "json",
            type: "POST",
            async: false,
            success: function (rsl) {
                if (rsl.result) {
                    var userStr = rsl.data;
                    var user = JSON.parse(userStr);
                    console.log("启动原辅料重新打码参数为：");
                    console.log(user);

                    var query = {
                        type: "MatAuxRePrint",
                        serverUrl: full,
                        logLevel: 'none', // info,warn,error

                        userCode: user.userCode,
                        baseCode: user.baseCode,
                    };

                    window.location.href = printUrl + JSON.stringify(query);
                } else {
                    layer.msg(info.message);
                }
            }
        });
    }

    // 启动版辊打印客户端
    function OpenPlateRollerPrint() {
        var printUrl = "printBarTools://";
        const full = location.protocol + '//' + location.host;

        $.ajax({
            url: "../Base/GetLoginUser",
            // data: { dataId: data.id, byCode: data.byBarCode },
            dataType: "json",
            type: "POST",
            async: false,
            success: function (rsl) {
                if (rsl.result) {
                    var userStr = rsl.data;

                    var user = JSON.parse(userStr);

                    console.log("启动版辊打码参数为：");
                    console.log(user);

                    var query = {
                        type: "PlateRollerPrint",
                        serverUrl: full,
                        logLevel: 'none', // info,warn,error

                        userCode: user.userCode,
                        baseCode: user.baseCode,
                    };

                    window.location.href = printUrl + JSON.stringify(query);
                } else {
                    layer.msg(info.message);
                }
            }
        });
    }

    function ChangePwd() {
        layer.open({
            type: 2,
            title: "修改密码",
            skin: 'layui-layer-rim', //加上边框
            area: ['45%', '60%'],
            content: "../System/ChanagePwd",
            offset: "auto"
        });
    }
</script>